package functions 
{	import functions.FunctionNode;	/**
	 * @author admin
	 */
	public class PrintFunctionNode extends FunctionNode 
	{
		public function PrintFunctionNode()
		{
			funcname = "print";	
			functiontype = FUNCTION;
		}
		
		override public function getValue( args : XML, scope : Object ) : XML
		{
			var returnXML:XML;
			var returnValue : String = "";
			
			for( var i : int = 0;i < args.children().length(); i++)
			{
				returnValue += Evaluator.getLiteral(args.children()[ i ]) + "\n";
	//			returnValue += Evaluator.getLiteral(Evaluator.evaluate(args.children()[ i ], scope)) + "\n";
			}
					
			returnXML = <stringliteral>{returnValue}</stringliteral>;
			trace( "PRINT::::" + returnValue);
			return returnXML;
		}	}}